package com.zfzs.post.modules.post.service.mapper.mybatis;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zfzs.post.model.vo.StockStateVO;
import com.zfzs.post.modules.post.domain.TerminalInfo;
import com.zfzs.post.modules.post.service.dto.TerminalInfoQueryCriteria;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author ck
 * @date 2019/10/14 11:37
 * @description
 */
public interface ITerminalInfoMapper extends BaseMapper<TerminalInfo> {


    /**
     * 后台终端列表
     *
     * @param dto
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<Map<String, Object>> findTerminalPageList(@Param("ex") TerminalInfoQueryCriteria dto, @Param("pageNum") long pageNum, @Param("pageSize") int pageSize);

    /**
     * 后台终端列表数量
     *
     * @param dto
     * @return
     */
    int findTerminalPageCount(@Param("ex") TerminalInfoQueryCriteria dto);

    List<TerminalInfo> findActivatingTerminal(@Param("channelId") Long channelId);

    List<StockStateVO> queryStockState(@Param("agentId") Long agentId, @Param("channelId") Long channelId);
}
